// import Vue from 'vue'
// import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutationTypes"

const user = {
    state: {
        token: '',
        username: '',
        realName: '',
        tenantId: '',
        info: {},
        permissionList: [],
        avatar: '',
        welcome: '',
    },

    mutations: {
        SET_TOKEN: (state,token) => {
           state.token = token;
        },
        SET_NAME: (state,{username,realName,welcome}) => {
            state.username = username
            state.realname = realname
            state.welcome = welcome
        },
        SET_AVATAR: (state, avatar) => {
            state.avatar = avatar
        },
        SET_INFO: (state, info) => {
            state.info = info
        },
        SET_TENANT: (state, id) => {
            state.tenantid = id
        },
        SET_PERMISSION_LIST: (state, permissionList) => {
            state.permissionList = permissionList
        },
    },

    actions: {
        GetPermissionList({commit}){
            return new Promise((resolve,reject) => {

            })
        }
    }
}

export default user;
